@import "./comp/ready";
@import "./comp/end";

.p-game {
  background-image: url(#{$base_path}/img/kv/kv-bg.png);
  #game {
    font-size: 0;
    
    &:before,
    &:after {
      top: 0;
      position: absolute;
      width: 100%;
      height: 100%;
      //content: "";
      z-index: 0;
      opacity: 0.7;
      pointer-events: none;
    }

    &:after {
      right: 0;
      background: -moz-linear-gradient(to right, rgba(0, 0, 0, .85), rgba(0, 0, 0, .1), rgb(0, 0, 0));
      background: -o-linear-gradient(to right, rgba(0, 0, 0, .85), rgba(0, 0, 0, .1), rgba(0, 0, 0, .85));
      background: -webkit-linear-gradient(to right, rgba(0, 0, 0, .85), rgba(0, 0, 0, .1), rgba(0, 0, 0, .85));
      background: linear-gradient(to right, rgba(0, 0, 0, .85), rgba(0, 0, 0, .1), rgba(0, 0, 0, .85));
    }

    &:before {
      left: 0;
      background: -moz-linear-gradient(to left, rgba(0, 0, 0, .85), rgba(0, 0, 0, .1), rgb(0, 0, 0));
      background: -o-linear-gradient(to left, rgba(0, 0, 0, .85), rgba(0, 0, 0, .1), rgba(0, 0, 0, .85));
      background: -webkit-linear-gradient(to left, rgba(0, 0, 0, .85), rgba(0, 0, 0, .1), rgba(0, 0, 0, .85));
      background: linear-gradient(to left, rgba(0, 0, 0, .85), rgba(0, 0, 0, .1), rgba(0, 0, 0, .85));
    }
  }

  .mask {
    z-index: 102;
    position: fixed;
    pointer-events: none;
    width: 100vw;
    height: 100vh;


    &.active {
      &.mask-water {
        > .content {
          opacity: 0.3 !important;
        }
      }

      > .content {
        opacity: 1 !important;

        &:before {
          opacity: .75 !important;
          transform: none;
        }

        &:after {
          opacity: .75 !important;
          transform: rotateZ(180deg);
        }
      }
    }

    &:after {
      top: 0;
      left: 0;
      position: absolute;
      width: 100%;
      height: 100%;
      //content: "";
      z-index: 0;
      opacity: 0.7;
      //background: -moz-linear-gradient(to right, rgba(0, 0, 0, .85), rgba(0, 0, 0, .1), rgb(0, 0, 0));
      //background: -o-linear-gradient(to right, rgba(0, 0, 0, .85), rgba(0, 0, 0, .1), rgba(0, 0, 0, .85));
      //background: -webkit-linear-gradient(to right, rgba(0, 0, 0, .85), rgba(0, 0, 0, .1), rgba(0, 0, 0, .85));
      //background: linear-gradient(to right, rgba(0, 0, 0, .85), rgba(0, 0, 0, .1), rgba(0, 0, 0, .85));
    }

    > .content {
      position: relative;
      width: 100%;
      height: 100%;
      z-index: 11;
      @include transition();

      &:before,
      &:after {
        position: absolute;
        content: "";
        height: 100vh;
        width: 90px;
        top: 0;
        background-repeat: no-repeat;
        background-size: cover;
        background-position: center;
        @include transition();
        opacity: 0;
      }

      &:before {
        @include transform(translateX(-100%));
      }

      &:after {
        right: 0;
        transform: translateX(100%) rotateZ(180deg);
      }
    }

    &.mask-normal {
      > .content {

        opacity: 0;

        &:before,
        &:after {
        }
      }
    }

    &.mask-water {
      > .content {
        background-image: url("https://yinli-qixi-run.varwey.com/2023/230318-changan-kv-game/img/mask-water.png");
        background-size: cover;
        background-position: center;
        opacity: 0;

        &:before,
        &:after {
        }
      }
    }

    &.mask-ice {
      > .content {
        background-image: url("https://yinli-qixi-run.varwey.com/2023/230318-changan-kv-game/img/mask-ice.png");
        background-size: cover;
        background-position: center;
        opacity: 0;

        &:before,
        &:after {
          opacity: 0;
          background-image: url("https://yinli-qixi-run.varwey.com/2023/230318-changan-kv-game/img/road-ice.png");
        }
      }
    }

    &.mask-fire {
      > .content {
        background-size: cover;
        background-position: center;
        opacity: 0;

        &:before,
        &:after {
          opacity: 0;
          background-image: url("https://yinli-qixi-run.varwey.com/2023/230318-changan-kv-game/img/road-fire.png");
        }
      }
    }
  }

  &.playing {

    &.water {
      // 处理蒙层
      &:after {
        position: absolute;
        top: 0;
        left: 0;
        width: 100vw;
        height: 100vh;
        pointer-events: none;
        z-index: 10;
        content: "";
        background: -moz-linear-gradient(to right, rgba(0, 0, 0, .25), rgba(0, 0, 0, .1), rgba(0, 0, 0, .25));
        background: -o-linear-gradient(to right, rgba(0, 0, 0, .25), rgba(0, 0, 0, .1), rgba(0, 0, 0, .25));
        background: -webkit-linear-gradient(to right, rgba(0, 0, 0, .25), rgba(0, 0, 0, .1), rgba(0, 0, 0, .25));
        background: linear-gradient(to right, rgba(0, 0, 0, .25), rgba(0, 0, 0, .1), rgba(0, 0, 0, .25));
      }

      > .inner {
        &:before,
        &:after {
          background-image: url(https://yinli-qixi-run.varwey.com/2023/230318-changan-kv-game/img/border-arrow-blue.svg);
        }
      }
    }

    &.fire {
      > .inner {
        &:before,
        &:after {
          background-image: url(https://yinli-qixi-run.varwey.com/2023/3w-lant-game-230327/img/border-arrow.svg);
        }
      }
    }

    &.ice {
      > .inner {
        &:before,
        &:after {
          background-image: url(https://yinli-qixi-run.varwey.com/2023/230318-changan-kv-game/img/border-arrow-blue.svg);
        }
      }
    }

    > .inner {
      &:before,
      &:after {
        background-image: url(https://yinli-qixi-run.varwey.com/2023/3w-road-book-230802/img/game/game-border-grass.png);
      }

      &:before {
        left: 0
      }

      &:after {
        right: 0;
        transform: rotateZ(180deg);
      }
    }
  }

  > .inner {
    position: relative;
    // &:before,
    // &:after {
    //   position: absolute;
    //   content: "";
    //   height: 100vh;
    //   width: 36px;
    //   top: 0;
    //   background-image: url(https://yinli-qixi-run.varwey.com/2023/3w-road-book-230802/img/game/game-border-grass.png);
    //   background-repeat: no-repeat;
    //   background-size: cover;
    //   background-position: center;
    //   @include transition(all .3s);
    // }

    // &:before {
    //   left: -36px;
    // }

    // &:after {
    //   right: -36px;
    //   transform: rotateZ(180deg);
    // }

    .cp-game-header {
      position: fixed;
      width: 100%;
      top: 0;
      padding: 20px 40px;
      justify-content: space-between;
      box-sizing: border-box;

      color: #fff;
      font-size: 18px;
      z-index: 99;
      &.cp-game-header-app {
        top: 30px;
      }
      .adm-space-item {
        flex: 0 0 140px;
      }
      .game-time,.game-score {
        height: 47px;
        display: block;
        font-size: 1.5rem;
        color: #fff;
        background-image: url(#{$base_path}/img/game/game-time.png);
        background-size: cover;
        line-height: 47px;
        text-indent: 48px;
      }
      .game-score {
        height: 47px;
        background-image: url(#{$base_path}/img/game/game-score.png);
        background-size: cover;
        text-indent: 55px;
        line-height: 47px;
      }
      > .inner {
        // display: flex;
        // width: 100%;
        // align-items: center;
        // justify-content: space-between;

        > div {
          // width: 100px;
          // text-align: right;
        }
      }

      .adm-avatar.adm-image {
        --size: 32px;
        --border-radius: 32px;
      }
    }

    .operation {
      position: fixed;
      bottom: 16px;
    }
  }

  .cp-pop-2 > .underlay > .content {
    min-height: 58px;
  }

  .adm-modal-body {
    max-height: 100vh;
    //height: 100vh;

    > .adm-modal-content {
      max-height: 100vh;
      min-height: 600px;
    }
  }
  .adm-progress-bar-trail {
    background-image: url(#{$base_path}/img/game/progress-bg.png);
    background-size: 100% 100%;
    width: 40vw;
    // height: 20px;
  }
}

